import Index from '../components/Index.vue'
import Find from '../components/Find.vue'
import Find_new from '../components/Find_new.vue'
import Public from '../components/Public.vue'
import About from '../components/About.vue'
import Register from '../components/Register.vue'
import Login from '../components/Login.vue'
import Idea from '../components/Idea.vue'
import My from '../components/My.vue'
import Rank from '../components/Rank.vue'
import chat from '../components/chat.vue'
import Donation from '../components/Donation.vue'
import DonationOK from '../components/DonationOK.vue'
import ChangePassword from '../components/ChangePassword.vue'
import ChangePasswordOK from '../components/ChangePasswordOK.vue'
import myIdea from '../components/childIdea/myIdea.vue'
import D_count from '../components/Public/D_count.vue'
import D_data from '../components/Public/D_data.vue'
import D_report from '../components/Public/D_report.vue'
import D_certificate from '../components/Public/D_certificate.vue'
import admin from '../components/Adminlogin.vue'
import adminhome from '../components/home.vue'
import user from '../components/user.vue'


var router = [
    {
        path: '/',
        component: Index,
    },
    {//发现页面
        path: '/find',
        component: Find,
        children: [{
            path: "",
            component: Find_new,
        }, ]
    },
    {//公开页面
        path: '/public',
        component: Public,
        children: [
            { path: '/', component: D_count },
            { path: '/D_data', component: D_data },
            { path: '/D_report', component: D_report },
            { path: '/D_certificate', component: D_certificate }
        ]
    },
    {//关于我们页面
        path: '/about',
        component: About,
    },

    {//开始注册
        path: '/register',
        component: Register,
    },
    {//开始登陆
        path: '/login',
        component: Login,
    },
    {//管理员开始登陆
        path: '/admin',
        component: admin,
    },
    {//管理员主界面
        path: '/home',
        component: adminhome,
        children:[
            {//管理员主界面
                path: 'user',
                component: user,
            },
        ]
    },

    {//idea界面
        path: '/idea',
        component: Idea,
        children: [{
            path: "/",
            component: myIdea
        },
        {
            path: 'chat',
            component: chat,

        },
        {//my界面
            path: 'my',
            component: My,
        },
        {//排行榜
            path: 'rank',
            component: Rank,
            // },
            // ]
        }]
    },


    {//开始捐赠
        path: '/donation',
        component: Donation,
    },
    {//开始捐赠成功
        path: '/donationOK',
        component: DonationOK,
    },
    {//修改密码
        path: '/changePassword',
        component: ChangePassword,
    },
    {//修改密码成功
        path: '/changePasswordOK',
        component: ChangePasswordOK
    }
    /*  {
     path: '*', component: 404,
     }*/


]
export default router